package com.gobang.domain.message;

import lombok.*;

/**
 * 对手离线通知消息DTO
 * 服务器向客户端发送的对手离线通知消息
 * 
 * @author System
 * @since 1.0.0
 */
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
public class OpponentOfflineMessage extends WebSocketMessage {
    
    /**
     * 对手离线通知数据
     */
    private OpponentOfflineData data;
    
    /**
     * 对手离线通知数据内部类
     */
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Builder
    public static class OpponentOfflineData {
        /**
         * 房间ID
         */
        private String roomId;
        
        /**
         * 对手ID
         */
        private Long opponentId;
        
        /**
         * 对手用户名
         */
        private String opponentUsername;
        
        /**
         * 等待时间（秒）
         */
        private Integer waitTime;
    }
    
    /**
     * 构造函数
     */
    public OpponentOfflineMessage(OpponentOfflineData data) {
        super("OPPONENT_OFFLINE");
        this.data = data;
    }
} 